Towards a Theory of Tracing for Functional Programs based on Graph Rewriting
نویسندگان
چکیده
The tracer Hat records in a detailed trace the computation of a program written in the lazy functional language Haskell. The trace can then be viewed in various ways to support program comprehension and debugging. Here we describe a model of the trace that captures its essential properties and allows formal reasoning. The trace structure was inspired by standard graph rewriting implementations of functional languages. The trace is a graph which is constructed by graph rewriting but goes beyond simple term graphs.
منابع مشابه
Towards an Intermediate Language based on Graph Rewriting
Lean is an experimental language for specifying computations in terms of graph rewriting. It is based on an alternative to Term Rewriting Systems (TRS) in which the terms are replaced by graphs. Such a Graph Rewriting System (GRS) consists of a set of graph rewrite rules which specify how a graph may be rewritten. Besides supporting functional programming, Lean also describes imperative constru...
متن کاملComplexity of Acyclic Term Graph Rewriting
Term rewriting has been used as a formal model to reason about the complexity of logic, functional, and imperative programs. In contrast to term rewriting, term graph rewriting permits sharing of common sub-expressions, and consequently is able to capture more closely reasonable implementations of rule based languages. However, the automated complexity analysis of term graph rewriting has recei...
متن کاملA Local Graph - rewriting System for Deciding Equality in Sum - product
The point-free style of programming [1] has been defended as a good choice for reasoning about functional programs. However, when one actually tries to construct a decision procedure for the associated equational theory, one faces problems, even when small fragments of the theory are considered. In this paper we outline how a graph-based decision procedure can be given for the functional calcul...
متن کاملAnalysis of Resting-State fMRI Topological Graph Theory Properties in Methamphetamine Drug Users Applying Box-Counting Fractal Dimension
Introduction: Graph theoretical analysis of functional Magnetic Resonance Imaging (fMRI) data has provided new measures of mapping human brain in vivo. Of all methods to measure the functional connectivity between regions, Linear Correlation (LC) calculation of activity time series of the brain regions as a linear measure is considered the most ubiquitous one. The strength of the dependence obl...
متن کاملA Rewriting Logic for Declarative Programming
Abst rac t . We propose an approach to declarative programming which integrates the functional and relational paradigms by taking possibly non-deterministic lazy functions as the fundamental notion. Programs in our paradigm are theories in a constructor-based conditional rewriting logic. We present proof calculi and a model theory for this logic, and we prove the existence of free term models w...
متن کامل